package com.guodexiain.nyiotclient.controller;

import com.guodexiain.nyiotclient.model.User;
import com.guodexiain.nyiotclient.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class RegistController {
    @Autowired
    private UserService userService;
    @RequestMapping("/test/Regist")
    @ResponseBody
    public  void Regist(@RequestBody User user){
        userService.save(user);
    }
}